<?php


namespace app\admin\validate;


use think\Validate;

class uploadRule extends Validate
{
    protected $rule = [
        'newsImage'=>['file','fileExt' => 'jpg,jpeg,png,bmp,gif', 'fileSize' => 500 * 1024],
    ];
    protected $message = [
        'newsImage.file'=>'上传文件不能为空',
        'newsImage.fileExt'=>'必须是传入图片文件',
        'newsImage.fileSize'=>'传入的文件不能超过500k',

    ];

    protected $scene = [
        'newsImage' => ['newsImage'],

    ];
}